package fr.mywiki.view.web.struts.form.admin.account;

import java.util.List;

import org.apache.struts.action.ActionForm;

import fr.mywiki.business.account.AccountLite;
import fr.mywiki.view.array.ArrayController;
import fr.mywiki.view.array.ArrayDefinition;
import fr.mywiki.view.web.struts.form.ListForm;

public class AccountListForm extends ActionForm implements ListForm {
	private static final long serialVersionUID = 1L;

	/** The array controller for the accounts. */
	private ArrayController accounts;

	private String idElement;
	
	/**
	 * Initializes the formular with the list of accounts given in parameter.
	 * 
	 * @param accountsList
	 *          a <code>List</code> of <code>AccountLite</code> objects.
	 */
	public void init(List accountsList) {
		this.accounts = new ArrayController(ArrayDefinition
				.getArrayDefinition(AccountLite.TYPE_ENT), accountsList);
	}

	public ArrayController getAccounts() {
		return accounts;
	}

	public void setAccounts(ArrayController accounts) {
		this.accounts = accounts;
	}

	public String getIdElement() {
		return idElement;
	}

	public void setIdElement(String idElement) {
		this.idElement=idElement;
	}
}
